from rest_framework.serializers import ModelSerializer
from .models import *
from rest_framework import serializers

class CbanjiSer(ModelSerializer):
    class Meta:
        model = Cbanji
        fields = '__all__'

class ClassSer(ModelSerializer):
    banji = CbanjiSer(read_only=True,many=True)
    class Meta:
        model = Cclass
        fields = '__all__'



class CuserSer(ModelSerializer):
    class Meta:
        model = Cuser
        fields = '__all__'

class SCuserSer(ModelSerializer):
    cla = ClassSer()
    class Meta:
        model = Cuser
        fields = '__all__'